package com.beiding.my.common.query;

import com.beiding.my.common.Bo;
import com.beiding.my.common.QuoteExpressionRegistry;

public class OuterCompareUnary extends OuterCompare{
    private String symbol;
    private String field;
    public void setSymbol(String symbol) {
        this.symbol = symbol;
    }
    public void setField(String field) {
        this.field = field;
    }
    @Override
    protected String createExpression(QuoteExpressionRegistry registry, Class<? extends Bo> type, ParamHolderCreator paramHolderCreator, CreateResult createResult) {
        QuoteExpressionRegistry.QuoteExpression quoteExpression = registry.getQuoteExpression(type, field);
        createResult.quoteConditions.addAll(quoteExpression.getQuoteConditions());
        createResult.beTypes.addAll(quoteExpression.getBeTypes());
        return quoteExpression.getExpression() + " " + symbol;
    }
}
